import request from '@/utils/request'
import { UserAddParams, UserListParams, UserListRes } from '@/interface/auth/user'

// 获取用户列表
export function getUserList(data: UserListParams): Promise<UserListRes> {
  return request.get('/api/auth/user/page', data)
}
// 新增用户
export function addUserApi(data: UserAddParams) {
  return request.post('/api/auth/user', data)
}
// 修改用户
export function updateUserApi(id:number, data:UserAddParams) {
  return request.put(`/api/auth/user/${id}`, data)
}
// 删除用户
export function deleteUserApi(id:number) {
  return request.delete(`/api/auth/user/${id}`)
}
